FROM php:7.2

ENV APOLLO_CONFIG_SERVER=http://apollo.development:8080
ENV APOLLO_APP_ID=guide
ENV APOLLO_NAMESPACES=guide.app,golang.guide
ENV APOLLO_SAVE_PATH=/home/config
ENV APOLLO_SYNC_ONCE=false

WORKDIR /var/www/html

COPY . /var/www/html

RUN composer install --no-dev --optimize-autoloader  && composer clearcache

CMD ["php", "bin/sync"]